#define _CRT_SECURE_NO_WARNINGS

#include<iostream>
#include<vector>
#include<queue>

using namespace std;
class Solution {
public:
    int findKthLargest(vector<int>& nums, int k) {
        priority_queue<int> pq{ nums.begin(),nums.end() };
        while (--k)
        {
            pq.pop();
        }
        return pq.top();
    }
};

int main()
{
    Solution s;
    vector<int> v;
    int k = 0;
    cin >> k;
    cout<<s.findKthLargest(v,k)<<endl;
}